@if(isset($rs['reload']))
<script type="text/javascript">
parent.location.reload();
</script>
@else
<!DOCTYPE>
<html>
@include('common.head')
<body style="background-color: #fff !important">
<meta name="csrf-token" content="{{ csrf_token() }}">
<div class="modelpact j-pactModel">
	<div class="row-fluid margin-bottom-25">
		<div class="span12">
			<!-- BEGIN VALIDATION STATES-->			
			<div class="portlet box gdcdc">
				<div class="portlet-body form">
					<!-- BEGIN FORM-->
					<form action="/order/uploadMaterial" id="form_pactchose" class="form-horizontal padding-top-20" method="post" enctype="multipart/form-data">
						<input type="hidden" id="order_id" name="order_id" value="{{$rs['order_detail']->order_id}}">
						<input type="hidden" name="_token" value="{{csrf_token()}}">
						<!-- 经销商 -->
						@if($rs['order_basic']->cust_type == 0)
							@if($rs['order_detail']->property == 'poison')
								@if($rs['order_detail']->status == 10)
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">企业营业执照<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="license" name="license" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">法人身份证<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="legal_card" name="legal_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">经营备案证明<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="market_card" name="market_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#license').val() == ''){
												layer.msg("企业营业执照不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#legal_card').val() == ''){
												layer.msg("法人身份证不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#market_card').val() == ''){
												layer.msg("经营备案证明不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif
								@if($rs['order_detail']->status == 11)
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">企业营业执照</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->license,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->license,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">法人身份证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">经营备案证明</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->market_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->market_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">办证用资料</label>
												<div class="uploader controls">
												    <input type="button" name="file" class="button" value="下载"/>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">购买证<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="shop_card" name="shop_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#shop_card').val() == ''){
												layer.msg("购买证不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif

								@if($rs['order_detail']->status == 12)
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">企业营业执照</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->license,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->license,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">法人身份证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">经营备案证明</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->market_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->market_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">购买证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['shop_card']->pic,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['shop_card']->pic,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">有效合同<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="contract" name="contract" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
												<div class="uploader controls">
													<input type="button" name="file" class="button" value="下载"/>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">委托书<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="transport_proxy" name="transport_proxy" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#contract').val() == ''){
												layer.msg("合同不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#transport_proxy').val() == ''){
												layer.msg("委托书不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif
							@endif
							<!-- 经销商易制毒END-->
							@if($rs['order_detail']->property == 'detonate')
								@if($rs['order_detail']->status == 10)
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">企业营业执照<span class="required">*</span></label>
												@if (isset($rs['material']->license_status) && $rs['material']->license_status == 1)
													<div class="controls">
														<img id="showPic" src="{{resizeImage('material/'.$rs['material']->license,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->license,'640','640')}}" class="upedimg">
													</div>
												@else
													<div class="uploader controls">
													    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
													    <input type="button" name="file" class="button" value="上传..."/>
													    <input id="license" name="license" class="button" type="file" size="30"/>
													    <div class="prired margin-top-10 hide" id="oa_msg">
															该合同类型需要发起OA审核，审核通过后可以使用
														</div>
													</div>
												@endif
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">法人身份证<span class="required">*</span></label>
												@if (isset($rs['material']->legal_card_status) && $rs['material']->legal_card_status == 1)
													<div class="controls">
														<img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640')}}" class="upedimg">
													</div>
												@else
													<div class="uploader controls">
													    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
													    <input type="button" name="file" class="button" value="上传..."/>
													    <input id="legal_card" name="legal_card" class="button" type="file" size="30"/>
													    <div class="prired margin-top-10 hide" id="oa_msg">
															该合同类型需要发起OA审核，审核通过后可以使用
														</div>
													</div>
												@endif
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">危化证<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="dcs_card" name="dcs_card[]" class="button" type="file" size="30" multiple/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">危化证附件<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="dcs_card_attach" name="dcs_card_attach[]" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">购买人身份证明<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="buy_card" name="buy_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#license').val() == ''){
												layer.msg("企业营业执照不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#legal_card').val() == ''){
												layer.msg("法人身份证不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#dcs_card').val() == ''){
												layer.msg("危化证不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#dcs_card_attach').val() == ''){
												layer.msg("危化证附件不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#buy_card').val() == ''){
												layer.msg("购买人身份证明不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
										
									</script>
								@endif
							@endif
							<!-- 经销商易制爆END-->
						@endif
						<!-- 经销商END-->
						<!-- 终端用户-->
						@if($rs['order_basic']->cust_type == 1)
							@if($rs['order_detail']->property == 'poison')
								@if($rs['order_detail']->status == 10)
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">企业营业执照<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="license" name="license" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">法人身份证<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="legal_card" name="legal_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#license').val() == ''){
												layer.msg("企业营业执照不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#legal_card').val() == ''){
												layer.msg("法人身份证不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif
								@if($rs['order_detail']->status == 11)
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">企业营业执照</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->license,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->license,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">法人身份证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">办证用资料</label>
												<div class="uploader controls">
												    <input type="button" name="file" class="button" value="下载"/>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">购买证<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="shop_card" name="shop_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											$('#form_pactchose').submit();
										}
									</script>
								@endif
								@if($rs['order_detail']->status == 12)
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">企业营业执照</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->license,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->license,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">法人身份证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">购买证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['shop_card']->pic,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['shop_card']->pic,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">有效合同<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="contract" name="contract" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
												<div class="uploader controls">
													<input type="button" name="file" class="button" value="下载"/>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">委托书<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="transport_proxy" name="transport_proxy" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#contract').val() == ''){
												layer.msg("合同不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#transport_proxy').val() == ''){
												layer.msg("委托书不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif
							@endif
							@if($rs['order_detail']->property == 'detonate')
								@if($rs['order_detail']->status == 10)
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">企业营业执照<span class="required">*</span></label>
												@if (isset($rs['material']->license_status) && $rs['material']->license_status == 1)
													<div class="controls">
														<img id="showPic" src="{{resizeImage('material/'.$rs['material']->license,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->license,'640','640')}}" class="upedimg">
													</div>
												@else
													<div class="uploader controls">
													    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
													    <input type="button" name="file" class="button" value="上传..."/>
													    <input id="license" name="license" class="button" type="file" size="30"/>
													    <div class="prired margin-top-10 hide" id="oa_msg">
															该合同类型需要发起OA审核，审核通过后可以使用
														</div>
													</div>
												@endif
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">法人身份证<span class="required">*</span></label>
												@if (isset($rs['material']->legal_card_status) && $rs['material']->legal_card_status == 1)
													<div class="controls">
														<img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640')}}" class="upedimg">
													</div>
												@else
													<div class="uploader controls">
													    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
													    <input type="button" name="file" class="button" value="上传..."/>
													    <input id="legal_card" name="legal_card" class="button" type="file" size="30"/>
													    <div class="prired margin-top-10 hide" id="oa_msg">
															该合同类型需要发起OA审核，审核通过后可以使用
														</div>
													</div>
												@endif
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">购买证明<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="illustrate" name="illustrate" class="button" type="file" size="30"/>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">购买人身份证明<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="buy_card" name="buy_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#license').val() == ''){
												layer.msg("企业营业执照不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#legal_card').val() == ''){
												layer.msg("法人身份证不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#illustrate').val() == ''){
												layer.msg("购买证明不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#buy_card').val() == ''){
												layer.msg("购买人身份证明不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
										
									</script>
								@endif
							@endif			
						@endif
						<!-- 终端用户END-->
						@if($rs['order_basic']->cust_type == 2)
							@if($rs['order_detail']->property == 'poison')
								@if($rs['order_detail']->status == 10)
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">事业单位法人证书<span class="required">*</span></label>
												@if (isset($rs['material']->bussines_legal_card_status) && $rs['material']->bussines_legal_card_status == 1)
													<div class="controls">
														<img id="showPic" src="{{resizeImage('material/'.$rs['material']->bussines_legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->bussines_legal_card,'640','640')}}" class="upedimg">
													</div>
												@else
													<div class="uploader controls">
													    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
													    <input type="button" name="file" class="button" value="上传..."/>
													    <input id="bussines_legal_card" name="bussines_legal_card" class="button" type="file" size="30"/>
													    <div class="prired margin-top-10 hide" id="oa_msg">
															该合同类型需要发起OA审核，审核通过后可以使用
														</div>
													</div>
												@endif
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">法人身份证<span class="required">*</span></label>
												@if (isset($rs['material']->legal_card_status) && $rs['material']->legal_card_status == 1)
													<div class="controls">
														<img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640')}}" class="upedimg">
													</div>
												@else
													<div class="uploader controls">
													    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
													    <input type="button" name="file" class="button" value="上传..."/>
													    <input id="legal_card" name="legal_card" class="button" type="file" size="30"/>
													    <div class="prired margin-top-10 hide" id="oa_msg">
															该合同类型需要发起OA审核，审核通过后可以使用
														</div>
													</div>
												@endif
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#bussines_legal_card').val() == ''){
												layer.msg("事业单位法人证书不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#legal_card').val() == ''){
												layer.msg("法人身份证不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif
								@if($rs['order_detail']->status == 11)
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">事业单位法人证书</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->bussines_legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->bussines_legal_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">法人身份证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">办证用资料</label>
												<div class="uploader controls">
												    <input type="button" name="file" class="button" value="下载"/>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">购买证<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="shop_card" name="shop_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#shop_card').val() == ''){
												layer.msg("购买证不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif
								@if($rs['order_detail']->status == 12)
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">事业单位法人证书</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->bussines_legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->bussines_legal_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">法人身份证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['material']->legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->legal_card,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract">
											<div class="control-group">
												<label class="control-label">购买证</label>
												<div class="uploader controls">
												    <img id="showPic" src="{{resizeImage('material/'.$rs['shop_card']->pic,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['shop_card']->pic,'640','640',0)}}" class="upedimg">
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">有效合同<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="contract" name="contract" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
												<div class="uploader controls">
													<input type="button" name="file" class="button" value="下载"/>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">委托书<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="transport_proxy" name="transport_proxy" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#contract').val() == ''){
												layer.msg("合同不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#transport_proxy').val() == ''){
												layer.msg("委托书不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif
							@endif
							@if($rs['order_detail']->property == 'detonate')
								@if($rs['order_detail']->status == 10)
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">事业单位法人证书<span class="required">*</span></label>
												@if (isset($rs['material']->bussines_legal_card_status) && $rs['material']->bussines_legal_card_status == 1)
													<div class="controls">
														<img id="showPic" src="{{resizeImage('material/'.$rs['material']->bussines_legal_card,'100','100')}}" org_pic="{{resizeImage('material/'.$rs['material']->bussines_legal_card,'640','640')}}" class="upedimg">
													</div>
												@else
													<div class="uploader controls">
													    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
													    <input type="button" name="file" class="button" value="上传..."/>
													    <input id="bussines_legal_card" name="bussines_legal_card" class="button" type="file" size="30"/>
													    <div class="prired margin-top-10 hide" id="oa_msg">
															该合同类型需要发起OA审核，审核通过后可以使用
														</div>
													</div>
												@endif
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">购买证明<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="illustrate" name="illustrate" class="button" type="file" size="30"/>
												</div>
											</div>
										</div>
									</div>
									<div class="choosmind">
										<div class="opt-contract" id="upload_contract">
											<div class="control-group">
												<label class="control-label">购买人身份证明<span class="required">*</span></label>
												<div class="uploader controls">
												    <input type="text" class="span7 twoupfile filename" name="twoupfile" readonly/>
												    <input type="button" name="file" class="button" value="上传..."/>
												    <input id="buy_card" name="buy_card" class="button" type="file" size="30"/>
												    <div class="prired margin-top-10 hide" id="oa_msg">
														该合同类型需要发起OA审核，审核通过后可以使用
													</div>
												</div>
											</div>
										</div>
									</div>
									<script type="text/javascript">
										function upload_material(){
											if($('#bussines_legal_card').val() == ''){
												layer.msg("事业单位法人证书不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#illustrate').val() == ''){
												layer.msg("购买证明不能能为空",{icon:2,time:1500});
												return false;
											}
											if($('#buy_card').val() == ''){
												layer.msg("购买人身份证明不能能为空",{icon:2,time:1500});
												return false;
											}
											$('#form_pactchose').submit();
										}
									</script>
								@endif
							@endif
						@endif
						<div class="publay_butom">			
							<a href="javascript:;" onclick="javascript:upload_material();" class="laysure-btn0">确定</a>		
							<a onclick="closedHandler()" class="laycols-btn1">取消</a>		
						</div>	
					</form>
					<!-- END FORM-->
				</div>
			</div>
			<!-- END VALIDATION STATES-->
		</div>
	</div>
</div>
<script src="{{URL::asset('static/js/bootstrap/fileinput.min.js')}}"></script>
<link rel="stylesheet" href="{{URL::asset('static/style/bootstrap/fileinput.min.css')}}">
<script type="text/javascript">
	function closedHandler(){
		var index = parent.layer.getFrameIndex(window.name);
		//刷新父层
		// parent.location.reload();
		//关闭弹出层
		parent.layer.close(index);
	}
	$(".uploader input[type=file]").change(function(){
		$(this).parents(".uploader").find(".filename").val($(this).val());
	});
	$("#showPic").click(function(){
		var pic = $(this).attr('org_pic');
		parent.showBigPic(pic);
	});

</script>
</body>
</html>
@endif